package com.allen.app.zdemo.domain;

import lombok.Getter;

/**
*
* Description: 事件 通知多个队列
*
* @author Limiaojun
* @date 2020/1/10 14:14
**/
public enum PublishExchange {

    TEST_MQ_PUBLISH("xxx-server.test-mq-event",
        new PublishQueue[]{PublishQueue.TEST_MQ_PUBLISH_QUEUE1, PublishQueue.TEST_MQ_PUBLISH_QUEUE2});


    @Getter
    String name;
    @Getter
    PublishQueue[] queues;

    PublishExchange(String name, PublishQueue[] queues) {
        this.name = name;
        this.queues = queues;
    }

    public enum PublishQueue {
        TEST_MQ_PUBLISH_QUEUE1("xxx-server.test-mq-event.publish1.receive"),
        TEST_MQ_PUBLISH_QUEUE2("xxx-server.test-mq-event.publish2.receive");

        @Getter
        String name;

        PublishQueue(String name) {
            this.name = name;
        }
    }

}
